
  
  library(shiny)
  library(ggplot2)
  
  ui <- page_sidebar(
    title = "Example dashboard",
    sidebar = sidebar(
      varSelectInput("var", "Select variable", mtcars)
    ),
    card(
      full_screen = TRUE,
      card_header("My plot"),
      plotOutput("p")
    )
  )
  
  server <- function(input, output) {
    output$p <- renderPlot({
      ggplot(mtcars) + geom_histogram(aes(!!input$var))
    })
  }
  
  shinyApp(ui, server)


